package com.huang.user.service;

import com.huang.domain.SysUser;
import com.huang.security.module.LoginUser;
import org.mockito.internal.util.collections.Sets;
import org.springframework.stereotype.Component;

/**
 * 登录校验方法
 * 
 * @author huangzx
 */
@Component
public class SysLoginService
{


    /**
     * 登录
     */
    public LoginUser login(String username, String password)
    {
        LoginUser loginUser = new LoginUser();
        loginUser.setUserid(123456L);
        loginUser.setUsername(username);
        SysUser sysUser = new SysUser();
        sysUser.setUserId(123L);
        sysUser.setUserName(username);
        loginUser.setSysUser(sysUser);
        loginUser.setPermissions(Sets.newSet("tool:huang:permissions"));
        return loginUser;
    }



}
